//
// Created by Administrator on 2021/10/21.
//

#include "Test.h"

void test01() {

    F * f = new S1();
    f->x = 1;
    f->y = 2;
    F * f2 = new S1();

    f->m();
    f2->m();

    SAFE_DELETE(f);
    //f->m();
    //f2->replease();
    //f2->m();

    //create object to deap
    log_info("/////////////////////////////////////////////////");
    TestObject* testObject = new TestObject();
    log_info(testObject->toString().c_str());

    //create object to stack
    TestObject testObject2;
    log_info(testObject2.toString().c_str());

    //delete testObject2;

    TestObject testObject3;
    testObject3.t();

    SAFE_DELETE(f2);
    SAFE_DELETE(testObject);

    //test file

    String fileCt = FileUtil::readStrFromFile("glsl/default.vs");
    log_debug(fileCt);
}

void test02() {
    log_info("test02");
}

void testString() {
    String s = GET_CLASS(__FILE__);
    int index = s.lastIndexOf('\\');
    String as = s.subStr(index + 1, s.length() - 1);
    log_info("\\ in s location is: %d", index);
    log_info("sub str : %s", as.c_str());
}


















